var data = {
    		request: {
				loginName: "",
				pageSize: null,
				pageIndex: null
			},
			columns: [
				{
                    type: 'selection',
                    width: 60,
                    align: 'center'
                },{
                    title: '标题',
                    key: 'title'
                }, {
                    title: '分类',
                    width: 100,
                    key: 'channelName'
                }, {
                    title: 'LOGO',
                    key: 'logoImg',
                    width: 100,
                    render (row, column, index) {
                    	if(row.logoImg){
                        	var src = imageServerUrl + '/' + row.logoImg;
                            return '<img style="width:60px;height:60px;border:none;margin:5px;" src="'+ src +'"/>';
                    	}
                    	return '';
                    }
                }, {
                    title: '简介',
                    key: 'intro'
                }, {
                    title: '关键字',
                    key: 'keywords'
                }, {
                    title: '作者',
                    width: 100,
                    key: 'author'
                }, {
                    title: '最近修改时间',
                    key: 'gmtModifyed',
                    width: 160,
                    sortable: true
                }, {
                    title: '操作',
                    width: 100,
                    key: 'action',
                    render () {
                        return '<i-button type="text" size="small">查看</i-button><i-button type="text" size="small">编辑</i-button>';
                    }
                }
			],
			list: []
		};
    var adminContainer = new Vue({
		el: '#container',
		data: function() {
			return data;
		},
		beforeCreate: function(){
			var vm = this;
			vm.$http.post('/channels').then((response) => {
				var res = response.data;
				if(res) {
					vm.channels = res;
				} 
			}, function(err) {});
		},
		methods: {
			changePage: function(page){
				var vm = this;
				vm.request.pageSize = vm.$refs.page.pageSize;
				vm.request.pageIndex = page - 1;
				vm.$http.post('/erp/article/query', JSON.stringify(vm.request)).then((response) => {
					var res = response.data;
					if(res.content) {
						vm.list = res.content;
					} 
				}, function(err) {});
			},
			search: function() {
				this.changePage(this.$refs.page.current);
			}
		}
	});